package ircbot;

import java.util.Iterator;

/**
 * The bot object will have one of these for each Job. It uses them to instiate jobs based on commands
 *
 * @author andreas
 */
public interface JobInitializer {
    /**
     * This method is needed for the bot to find out wich command should start the job
     *
     * @return The command wich starts up the Job
     */
    public String getCmd();

    /**
     * the Job initializer must be able to return an Iterator of the jobs it have initialized
     * @return Iterator of Jobs
     */
    public Iterator<Job> iterator();

    /**
     * This method created a instance of the specific job the specifik initializer can initialize.
     *
     * @param name The name of the job. This name is used to reference the job in the future.
     * @param bot The job needs a reference to the bot, so that it can send messages and stuff
     * @param channel the job needs to know wich channel it exists in
     */
    public void newJob(String name, Bot bot, String channel);

    /**
     * This method removes the job with the specified name.
     *
     * @param name
     */
    public void removeJob(String name);
}
